import 'dart:convert';

import 'package:get/get.dart';
import 'package:pdzs_app/entities/notice.dart';

import '../utils/http.dart';

class NoticeController extends GetxController {
  var notice = ''.obs;
  getNotice() async {
    var response = await Https.instance.dio.get('/login/huoqugonggao');

    Notice data = Notice.fromJson(jsonDecode(response.data));
    notice.value = data.data!.gonggao!;
  }

  @override
  void onInit() {
    super.onInit();
    //初始化时请求数据
    getNotice();
  }
}
